/*
Jack Morris
11/20/14
Chapter 5
Page 96
Assinment 3
*/
#include <stdio.h>

int main(void)
{
  float commission, value;
  
  printf("Enter price per share: ");
  scanf("%f" &value);
  
  if (value < 2500.00f)
    comission = 30.00f + .017 * value;
  else if (value < 6250.00f)
    commission = 56.00f + .0066f * value;
  else if (value < 20000.00f)
    commission = 76.00f + .0034f * value;
  else if (value < 50000.00f)
    comission = 100.00f + .0022f *value;
  else if (value < 500000.00f)
    comission = 155.00f + .0011f * value;
  else
    comission = 255.00f + .0009f * value;
    
  if (commission < 39.00f)
    comission = 39.00f;
  printf("Commission: $%.5f\n", commission);
  return(0);
}